<template>
	<!-- 管理门店 -->
	<view class="wp">
		<view class="body">
			<view class="list_item" v-for="(item,idx) in list" :key="idx"
				@click="$navTo('../user/dlrecharge?uid='+item.uid)">
				<view class="top">
					<image :src="item.logo" mode=""></image>
					<view class="right">
						<view class="title">
							<text class="name">{{item.supname}}</text>
						</view>
						<view class="money">
							<view class="m_li" style="font-size: 24upx;">
								<text>入驻时间</text>
								<text>{{item.createtime}}</text>
							</view>
						</view>
						<view class="money">
							<view class="m_li">
								<text>成本折扣</text>
								<text class="color_1">{{item.discount}}折</text>
							</view>
							<view class="m_li">
								<text>可用额度</text>
								<text class="number">{{item.usemoney}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="empty">
				<image v-if="isloading" src="../../static/business/loading.gif" mode=""></image>
				<text v-if="!ismore">到底了~</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 0,
				list: [],
				isloading: false,
				ismore: true,
			}
		},
		onLoad() {
			this.getList();
		},
		onReachBottom() {
			this.getList();
		},
		methods: {
			getList() {
				this.page++;
				this.isloading = true;
				this.ismore = true;
				this.$axios('money/suplist', 'POST', 'member', {
					page: this.page
				}).then(res => {
					this.isloading = false;
					if (res.data.code == 200) {
						this.list = [...this.list, ...res.data.data];
						this.ismore = res.data.data.length > 0;
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #f2f2f2;
		color: #303133;
	}

	.wp {
		letter-spacing: 1px;
	}

	.nav_bar {
		background: #fff;
		position: fixed;
		top: 0;
		width: 100%;
		z-index: 100;

		.serch {
			display: flex;
			align-items: center;

			.input {
				flex: 1;
			}

			.screen {
				font-size: 32upx;
				padding-right: 10px;

				text {
					display: inline-block;
					transform: rotateZ(90deg);
				}
			}
		}

		.number {
			font-weight: bold;
			line-height: 24px;
			padding: 0 10px 10px;
		}
	}

	.body {
		// padding: 100px 0;
		padding: 0 0 66px;

		.list_item {
			background: #fff;
			border-radius: 15upx;
			margin-bottom: 10px;
			padding: 20upx;

			.top {
				display: flex;

				image {
					border-radius: 15upx;
					height: 135upx;
					width: 135upx;
				}

				.right {
					line-height: 45upx;
					padding-left: 20upx;
					width: calc(100% - 135upx);

					.title {
						color: #000;
						display: flex;
						align-items: center;
						font-size: 32upx;

						.name {
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							padding-right: 20upx;
							width: calc(100% - 155upx);
						}

						.label {
							border: 1px $bg-color solid;
							border-radius: 10upx;
							color: $bg-color;
							flex: 1;
							font-size: 28upx;
							text-align: center;
						}
					}

					.money,
					.m_li {
						color: #666;
						display: flex;
						align-items: center;
						justify-content: space-between;

						.m_li {
							justify-content: flex-start;

							.number {
								color: #000;
							}
						}
					}


				}
			}

			.color_1 {
				color: $bg-color;
			}

			.color_2 {
				color: #8405dc;
			}

			.color_3 {
				color: #02883d;
			}
		}
	}

	.scroll_screen {
		height: 100vh;
	}

	.uni-forms {
		padding: 0 20upx;
	}

	.uni-forms .uni-forms-item__label {
		padding-bottom: 0 !important;
	}

	.uni-forms .uni-forms-item {
		margin-bottom: 10px;
	}

	.data_time {
		border: 1px solid #e5e5e5;
		border-radius: 4px;
		color: #666;
		font-size: 14px;
		height: 35px;
		line-height: 35px;
		padding: 0 10px;
	}

	.screen_submit {
		padding-top: 50upx;
		text-align: center;

		button {
			background: $bg-color;
			color: #fff;
			line-height: 90upx;
			height: 90upx;
			font-size: 34upx;
			letter-spacing: 1px;
		}
	}

	.block {
		height: 100upx;
	}

	.empty {
		image {
			height: 60upx;
			width: 60upx;
		}

		padding-top: 30upx;
		text-align: center;
		color: #4399fc;
	}
</style>